package com.hub.realtime.resource.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hub.realtime.flinkshims.core.model.SqlError;
import com.hub.realtime.resource.domain.ResFlinkConf;
import com.hub.realtime.resource.domain.ResFlinkJob;
import com.hub.realtime.resource.domain.ResJobLog;
import com.hub.realtime.resource.dto.input.*;
import com.hub.realtime.resource.dto.output.UploadResult;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.multipart.MultipartFile;


import java.util.List;

/**
 * 作业管理中心Service接口
 *
 * @author wupeng
 * @date 2022-01-18
 */
public interface IResFlinkJobService extends IService<ResFlinkJob> {
    Page<ResFlinkJob> list(FlinkJobQueryParam param);

    int saveInfo(ResFlinkConf flinkJob);

    int deleteInfos(Long[] ids);

    List<UploadResult> createUploadFile(MultipartFile[] file, Long applicationId);

    void deleteHdfsTmp(List<DepParam> params);

    void deployejob(Long jobId);

    void startJob(JobStartAndStopParam param);


    void syncJobState(ResFlinkJob flinkJob);

    void triggerSavePointOnTimer();

    void stopJob(StopTriggerSavePoint stopTriggerSavePoint);

    SqlError verifySql(SqlQueryParam sqlQueryParam);

    ResJobLog getErrorLogByJobId(Long jobId);
}

